subscribe

open fun subscribe(@NonNull() observer: Observer, @NonNull() events: List<String>)

Subscribes an `observer` to a provided array of event types.The `observable` will hold a strong reference to an `observer` instance, therefore,in order to stop receiving notifications, caller must call `unsubscribe` with an`observer` instance used for an initial subscription.

Parameters

observer

An `observer` that will be subscribed to a given events.

events

An array of event types to be subscribed to.